import { http } from './service.js'
function get(url:string,params?:any,option?:any){
    if(!option) option = {}
    option.params = params
    return http.get(url,option)
}

function post(url:string,data?:any,option?:any){
    return http.post(url,data,option)
}

function put(url:string,data?:any,option?:any){
    return http.put(url,data)
}

function del(url:string,data?:any,option?:any){
    return http.delete(url,data)
}

// 配置参考文档https://www.quanzhan.co/luch-request/guide/3.x/#upload
function upload(url:string,option?:any){
    return http.upload(url,option)
}

export default {
    get,post,put,del,upload
}